﻿@model RewardEditModel
@{
    string trueName = ViewData.Get<string>("UserTureName", "");
    var experience = ViewData.Get<PointCategory>("experience", new PointCategory());
    var trade = ViewData.Get<PointCategory>("trade", new PointCategory());
}
@Html.AntiForgeryToken()
<div class="panel">
    <div class="panel-body">
        @using (Html.BeginAjaxForm("_RewardUser", "ControlPanel", "", FormMethod.Post, new AjaxFormOptions { OnSuccessCallBack = "RewardUserCallBack" }, new { @class = " tn-form-validation " }))
        {
            @Html.HiddenFor(m => m.UserId)
            <div class="form-group">
                <label style="color:gray">为 @trueName 奖惩积分,惩罚设置为负值</label>
            </div>
            <div class="form-group">
                <label for="ExperiencePoints">@(experience.CategoryName)</label>
                @Html.TextBoxFor(m => m.ExperiencePoints, htmlAttributes: new { @class = "form-control" })
                @Html.ValidationMessageFor(m => m.ExperiencePoints)
            </div>
            <div class="form-group">
                <label for="TradePoints">@(trade.CategoryName)</label>
                @Html.TextBoxFor(m => m.TradePoints, htmlAttributes: new { @class = "form-control" })
                @Html.ValidationMessageFor(m => m.TradePoints)
            </div>
            <div class="form-group">
                @Html.LabelFor(m => m.Reason)
                @Html.TextBoxFor(m => m.Reason, htmlAttributes: new { @class = "form-control" })
                @Html.ValidationMessageFor(m => m.Reason)
            </div>
            <div class="form-group">
                <button type="submit" class="btn btn-primary tn-mr-10 tn-btn-wp">确定</button>
                <button type="button" class="btn btn-default tn-btn-wp" data-dismiss="modal" onclick="layer.closeAll()">关闭</button>
            </div>
        }
    </div>
</div>